package com.qfedu.order.service.Impl;

import com.qfedu.fmmall.entity.OrderItem;
import com.qfedu.order.dao.OrderItemMapper;
import com.qfedu.order.service.OrderitemQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class OrderitemQueryServiceImpl implements OrderitemQueryService {
    @Autowired
    private OrderItemMapper orderItemMapper;

    @Override
    public List<OrderItem> QueryOrderItem(String orderId) {
        Example example = new Example(OrderItem.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("orderId",orderId);
        List<OrderItem> orderItems = orderItemMapper.selectByExample(example);


        return orderItems;
    }
}
